package tec;

import java.io.IOException;
import java.io.Writer;
import java.io.FileWriter;
import java.io.PrintWriter;

public class CollecteFichier
    extends Collecte {

    private FileWriter file;
    private PrintWriter file_printer;

    public CollecteFichier(String filename){
	super();
	try{
	    file = new FileWriter(filename);
	}
	catch (IOException e){
	    System.out.println(e);
	}
	file_printer = new PrintWriter(file);
    }

    protected void ajouterDonnees(){
	file_printer.println("arret n° :" + numero_arret + "\nNombre Entrees : "+entrees+"\nNombre Sorties : "+sorties+"\n");
	file_printer.flush();
    }

}